package xio.ccf_201409;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;

/**
 * ccf 201409-4 最优配餐 90分 运行超时
 * Created by Xio on 2017/11/6 0006.
 */
public class OptimalCatering {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[][] dist = new int[1002][1002];
        boolean[][] marked = new boolean[1002][1002];

        Pos[] dir={new Pos(0,1),new Pos(1,0),new Pos(-1,0),new Pos(0,-1)};
        Queue<Pos> storesQueue = new LinkedList<>();

//        ArrayList<Pos> stopPos = new ArrayList<>();
        ArrayList<Pos> clientsPos = new ArrayList<>();
        int n = sc.nextInt();
        int numStore = sc.nextInt();
        int numClient = sc.nextInt();
        int numStop = sc.nextInt();

        for (int i = 0; i < numStore; i++) {
            int x = sc.nextInt();
            int y = sc.nextInt();
            storesQueue.add(new Pos(x,y));
            dist[x][y] = 0;
            marked[x][y] = true;
        }

        for (int i = 0; i < numClient; i++) {
            clientsPos.add(new Pos(sc.nextInt(),sc.nextInt(),sc.nextInt()));
        }

        for (int i = 0; i < numStop; i++) {
            int x = sc.nextInt();
            int y = sc.nextInt();
//            stopPos.add(new Pos(x,y));
            dist[x][y] = -1;
            marked[x][y] = true;

        }
        Pos p;
        while (!storesQueue.isEmpty()){
            p = storesQueue.poll();
            for (int i = 0; i < 4; i++) {
                Pos tmp = new Pos(p.x+dir[i].x,p.y+dir[i].y);
                int tx = tmp.x;
                int ty = tmp.y;
                if (!marked[tx][ty] &&
                        (tx >=1 && ty>=1 && ty<=n && tx<=n)){
                    dist[tx][ty] = dist[p.x][p.y]+1;
                    marked[tx][ty] = true;
                    storesQueue.add(tmp);
                }
            }
        }

        long result = 0;
        Pos cp;
        for (int i = 0; i < numClient; i++) {
             cp = clientsPos.get(i);
            result += dist[cp.x][cp.y]*cp.cost;
        }
        System.out.println(result);
    }

    static class Pos{
        int x;
        int y;
        int cost;

        public Pos(int x, int y) {
            this.x = x;
            this.y = y;
            this.cost = 0;
        }
        public Pos(int x, int y, int cost) {
            this.x = x;
            this.y = y;
            this.cost = cost;
        }
    }
}
